Repository navigation
fix(portal): stop a long example response running over the previous and next page cards - #476
Merged
Merged
Conversation
…ious and next page cards Since fumadocs-openapi 12.6 the example column of an operation page is sticky and no taller than the window, and its cards are meant to shrink to fit it. Ours did not: the layout around them was a plain block, so a long "Example Response" ran out of the column, over the page's previous and next cards, and its end could not be reached at all. The layout now takes the classes of Fumadocs' own, and the request card passes the column's height on at every box down to its code, as Fumadocs' request card does. Without that the request card keeps its full height and the response card under a long sample is squeezed to its header. Both cards now share the column and scroll inside it. Below the width where the column sits beside the page, nothing changes. The example selector loses a bottom margin that used to collapse into the card's own, so the gap under it stays 16px. Refs apimatic/apimatic-io#2350 (point 2) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ds shrink Refs apimatic/apimatic-io#2350 (point 2) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
sohail2721
requested review from
Shield-Jaguar and
saeedjamshaid
as code owners
November 16, 2026 10:39
mehnoorsiddiqui
approved these changes
Nov 16, 2026
Merged
Contributor
|
🎉 This PR is included in version 2.3.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Point 2 of apimatic/apimatic-io#2350: on an operation page, a long "Example Response" ran over the page's previous and next cards.
What was wrong
Since fumadocs-openapi 12.6 the example column of an operation page is sticky and no taller than the window, and the cards in it are meant to shrink to fit. Ours could not. The layout we render around them was a plain block, so each card kept its full height, and a long response ran out of the bottom of the column and over the previous and next cards. Because the column is sticky, the end of that response could not be scrolled to either.
The fix
example-layout.tsx) takes the classes of Fumadocs' own default layout,flex min-h-0 flex-col, so the column's height reaches the cards.usage-tabs.tsx) passes that height on at each box down to its code: the tabs, the open tab, the element marked for session replays, the block and its scroller. This is what Fumadocs' own request card does. With the layout change alone the overlap is gone, but our request card keeps its full height and the response card under a long sample is squeezed: to 131 px in a 1617 x 887 window, and to 44 px, its header only, at 1280 x 800.mb-2. That margin used to collapse into the request card's own top margin; in a flex column it would add 8 px. The gap under the selector stays 16 px.Below the width where the column sits beside the page, nothing changes: the column is not capped there, and both cards keep their height.
Pictures
A neutral spec with a long request body and a long response, built with
portal generate.Before, 1617 x 887, scrolled to the end of the page:
After, the same view:
After, 1280 x 800, at the top of the page:
Checked
Measured in headless Chrome on a portal built from this branch:
test/e2e/portal-build.test.ts, the "portal build (end to end)" fixture: 45 passing. That includes a new check of the built page's boxes, the existing cURL marker check, and the template's type-check.I did not run the whole suite, and there is no browser test for this yet: the layout itself can only be held in
apimatic/v4-test-automation.The other points of the issue are not in this PR. Points 3 to 6 are Fumadocs' own and are reported as fuma-nama/fumadocs#3864 and fuma-nama/fumadocs#3865.
🤖 Generated with Claude Code